#include "EBO.h"

EBO::EBO()
{
	glGenBuffers(1, &m_ID);
}

EBO::~EBO()
{
	glDeleteBuffers(1, &m_ID);
}

void EBO::bind()
{
	glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_ID);
}

void EBO::unBind()
{
	glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
}

void EBO::bufferData(GLsizeiptr size, const void *data)
{
	glBufferData(GL_ELEMENT_ARRAY_BUFFER, size, data, GL_STATIC_DRAW);
}

void EBO::drawElements(GLenum mode, GLsizei count, GLenum type, const void *indices)
{
	glDrawElements(mode, count, type, indices);
}

unsigned int EBO::getID()
{
	return m_ID;
}